import request, { post, get } from "@/utils/request";

//-------------------------------登陆---------------------------------------
// 登陆
export const login = (params) => post("/login",params)
//登出
export const logout = () => get("/login/logout")
//修改密码
export const changePassword = (params) => post("/user/changePassword",params)

//-------------------------------上传---------------------------------------
// 上传图片
export const uploadImage = (params) => post("/common/uploadImage",params)
// 上传文件
export const uploadFile = (params) => post("/common/uploadFile",params)

//-------------------------------菜单---------------------------------------
// 查询菜单
export const getMenuList = (params) => post("/menu/getMenuList",params)
//保存菜单
export const saveMenu = (params) => post("/menu/saveMenu",params)
//更新菜单
export const editMenu = (params) => post("/menu/editMenu",params)
//删除菜单
export const removeMenu = (params) => get("/menu/removeMenu",params)
//根据id查询菜单
export const getMenuById = (params) => get("/menu/getById",params)
//根据用户获取菜单权限
export const getMenuByUser = () => get("/menu/getMenuByUser")

//-------------------------------角色---------------------------------------
// 查询角色
export const getRolePage = (params) => post("/role/getRolePage",params)
//查询角色列表
export const getRoleList = (params) => post("/role/getRoleList",params)
//根据id获取角色
export const getRoleById = (params) => get("/role/getRoleById",params)
//保存角色
export const saveRole = (params) => post("/role/saveRole",params)
//更新角色
export const editRole = (params) => post("/role/editRole",params)
//删除角色
export const removeRole = (params) => get("/role/removeRole",params)

//-------------------------------用户---------------------------------------
// 查询用户
export const getUserPage = (params) => post("/user/getUserPage",params)
//根据id查询用户
export const getUserById = (params) => get("/user/getUserById",params)
//保存用户
export const saveUser = (params) => post("/user/saveUser",params)
//更新用户
export const editUser = (params) => post("/user/editUser",params)
//审核律师
export const toExamine = (params) => post("/user/toExamine",params)
//删除用户
export const removeUser = (params) => get("/user/removeUser",params)
//重置密码
export const resetPassword = (params) => post("/user/resetPassword",params)
//获取登陆用户信息
export const getUser = () => get("/user/getUserInfo")
//修改个人信息
export const setUserInfo = (params) => post("/user/setUserInfo",params)
//修改个人头像
export const setUserAvatar = (params) => get("/user/setUserAvatar",params)

//-------------------------------日志---------------------------------------
// 查询登陆日志
export const getLogPage = (params) => post("/loginLog/getLogPage",params)
// 删除登陆日志
export const removeLog = (params) => get("/loginLog/removeLog",params)
// 清空登陆日志
export const clearLog = () => get("/loginLog/clearLog")
// 查询操作日志
export const getOperLogPage = (params) => post("/operLog/getLogPage",params)
// 删除操作日志
export const removeOperLog = (params) => get("/operLog/removeLog",params)
// 清空操作日志
export const clearOperLog = () => get("/operLog/clearLog")

//-------------------------------学校---------------------------------------
//查询学校
export const getFoodSchoolPage = (params) => post("/school/getFoodSchoolPage",params)
//根据id查询学校
export const getFoodSchoolById = (params) => get("/school/getFoodSchoolById",params)
//保存学校
export const saveFoodSchool = (params) => post("/school/saveFoodSchool",params)
//更新学校
export const editFoodSchool = (params) => post("/school/editFoodSchool",params)
//删除FoodSchool
export const removeFoodSchool = (params) => get("/school/removeFoodSchool",params)
//获取学校列表
export const getFoodSchoolList = () => get("/school/getFoodSchoolList")

//-------------------------------美食类型---------------------------------------
//查询美食类型
export const getFoodTypePage = (params) => post("/type/getFoodTypePage",params)
//根据id查询美食类型
export const getFoodTypeById = (params) => get("/type/getFoodTypeById",params)
//保存美食类型
export const saveFoodType = (params) => post("/type/saveFoodType",params)
//更新美食类型
export const editFoodType = (params) => post("/type/editFoodType",params)
//删除FoodType
export const removeFoodType = (params) => get("/type/removeFoodType",params)
//获取美食类型
export const getFoodTypeList = () => get("/type/getFoodTypeList")

//-------------------------------餐厅---------------------------------------
//查询餐厅
export const getFoodRestaurantPage = (params) => post("/restaurant/getFoodRestaurantPage",params)
//根据id查询餐厅
export const getFoodRestaurantById = (params) => get("/restaurant/getFoodRestaurantById",params)
//保存餐厅
export const saveFoodRestaurant = (params) => post("/restaurant/saveFoodRestaurant",params)
//更新餐厅
export const editFoodRestaurant = (params) => post("/restaurant/editFoodRestaurant",params)
//删除FoodRestaurant
export const removeFoodRestaurant = (params) => get("/restaurant/removeFoodRestaurant",params)

//-------------------------------美食---------------------------------------
//查询美食
export const getFoodListPage = (params) => post("/list/getFoodListPage",params)
//根据id查询美食
export const getFoodListById = (params) => get("/list/getFoodListById",params)
//保存美食
export const saveFoodList = (params) => post("/list/saveFoodList",params)
//更新美食
export const editFoodList = (params) => post("/list/editFoodList",params)
//删除FoodList
export const removeFoodList = (params) => get("/list/removeFoodList",params)
//获取餐厅列表
export const getFoodRestaurantList = () => get("/restaurant/getFoodRestaurantList")
//根据学校获取餐厅
export const getFoodRestaurantBySchool = (params) => get("/restaurant/getFoodRestaurantBySchool",params)

//-------------------------------收藏---------------------------------------
//查询收藏
export const getFoodFavorPage = (params) => post("/favor/getFoodFavorPage",params)
//根据id查询收藏
export const getFoodFavorById = (params) => get("/favor/getFoodFavorById",params)
//保存收藏
export const saveFoodFavor = (params) => post("/favor/saveFoodFavor",params)
//更新收藏
export const editFoodFavor = (params) => post("/favor/editFoodFavor",params)
//删除FoodFavor
export const removeFoodFavor = (params) => get("/favor/removeFoodFavor",params)

//-------------------------------评论---------------------------------------
//查询评论
export const getFoodCommentPage = (params) => post("/comment/getFoodCommentPage",params)
//根据id查询评论
export const getFoodCommentById = (params) => get("/comment/getFoodCommentById",params)
//保存评论
export const saveFoodComment = (params) => post("/comment/saveFoodComment",params)
//更新评论
export const editFoodComment = (params) => post("/comment/editFoodComment",params)
//删除FoodComment
export const removeFoodComment = (params) => get("/comment/removeFoodComment",params)

//-------------------------------说明信息---------------------------------------
//查询说明信息
export const getFoodRemarkPage = (params) => post("/remark/getFoodRemarkPage",params)
//根据id查询说明信息
export const getFoodRemarkById = (params) => get("/remark/getFoodRemarkById",params)
//保存说明信息
export const saveFoodRemark = (params) => post("/remark/saveFoodRemark",params)
//更新说明信息
export const editFoodRemark = (params) => post("/remark/editFoodRemark",params)
//删除FoodRemark
export const removeFoodRemark = (params) => get("/remark/removeFoodRemark",params)
//获取首页数据
export const indexManage = () => get("/index/indexManage")
